


window.onload = function (){
    showOrder(1);
}



function showOrder(pageNO){
    axios.get("/custom/order/findByUser",{
        params:{
            pageNO
        }
    }).then(e=>{
        var info = e.data;
        var str ="";
        for (var i=0;i<info.records.length;i++){
            var obj = info.records[i];

            str+=`<tr><td>${obj.id}</td><td>${obj.price}</td><td>${obj.status}
            </td><td>${obj.date}</td><td><a href="/custom/findOrder.html?id=${obj.id}">查看详情</a></td>
                </tr>`
        }
        $("OrDate").innerHTML =str;
        var cutPage="";
        for (var i=1;i<=info.pages;i++){
            cutPage+=`<a href="javascript:showOrder(${i})">${i}</a>`;
        }
        $("cutPageDiv").innerHTML = cutPage;
    })
}

function  returnS(){
    location.href="/index.html"
}